This invention relates in general to programmable logic controllers and, more particularly, to a method for determining if the statements of a program utilized by a programmable logic controller are expressible in the form of a relay ladder diagram.
Prior to the time of modern computer technology and programmable logic controllers, logic functions were electromechanically implemented using electric relays, time delay circuits and the like. To aid technicians in wiring such relay logic circuits after they were designed by engineers, these relay logic circuits were represented in the form of what became known an relay ladder diagrams, a brief example of which is shown in FIG. 1. Typically, such relay ladder diagrams include a positive power supply rail 10 and a negative power supply rail 15, each represented by respective vertical lines as in the diagram of FIG. 1. The relay ladder diagram of FIG. 1 includes contacts 20 and 25 which are coupled in series with positive rail 10. Contacts 20 and 25 represent inputs Ia and Ib. The diagram further includes an output 30 which is designated Qa. Output Qa may be a motor or meter or other electrically operated device. In essence, the relay ladder diagram of FIG. 1 represents the AND'ing of inputs Ia and Ib, the result of which is provided to output Qa. Contacts 20 and 25 are said to form a rung of this relay ladder diagram. Several rungs can be positioned between the vertical rails of this diagram to perform additional AND logic operations thus giving the diagram the general appearance of a ladder. To indicate the performance of OR logic operations, rungs can be connected together and to a common output as will be illustrated later.
Modern programmable logic controllers can be programmed in a language, such as Instruction List (IL) language, which is known to those skilled in the controller art. For the most part, a language such as Instruction List, can be expressed in terms of a relay ladder diagram and be displayed as such for the convenience of technicians who must perform associated logic circuit wiring. Unfortunately, it has been found that not all IL programs can accurately be expressed in terms of relay ladder diagrams. That is, not all IL programs can be translated or converted to relay ladder diagrams for display to the user.